<?php

declare(strict_types=1);

namespace app\core\DB\Interfaces;

interface IStatement
{
    /**
     * Binds a value to a corresponding named or question mark placeholder in the SQL statement that was used to prepare the statement. 
     *
     * @param string|int  $param Parameter identifier. For a prepared statement using named placeholders, this will be a parameter name of the form :name. For a prepared statement using question mark placeholders, this will be the 1-indexed position of the parameter. 
     * @param mixed $value The value to bind to the parameter. 
     * @param int $type Explicit data type for the parameter using the PDO::PARAM_* constants. 
     * @return boolean
     */
    public function bindValue($param, mixed $value, int $type = \PDO::PARAM_STR): bool;
    public function bindParam($param,mixed &$var,int $type = \PDO::PARAM_STR,int $maxLength = 0,mixed $driverOptions = null ): bool;
    public function execute(?array $params = null): bool;
    public function fetch():mixed;
    public function closeCursor():bool;
    public function rowCount():int;
    public function fetchAll():array;
}
